package com.jyh.homework6;

/**
 * @Author JYH
 * @Date 2024/8/8 18:57
 * @Description
 */
public class LetterPrinter extends Thread{
    private Printer p;

    public LetterPrinter(Printer p) {
        this.p = p;
    }

        @Override
        public void run() {
            char c='A';
            while (c<='Z'){
                p.print(c);
                c++;
            }
        }
    }

